package ooExercise.day04;

public class Master {
    void feed(Animal animal){
        animal.eat();
        animal.drink();
        if(animal instanceof Dog){
            ((Dog) animal).lookHome();
        }
        if(animal instanceof Cat){
            ((Cat) animal).Catchmouse();
        }
        if(animal instanceof Swim){
            ((Swim) animal).swim();
        }
    }
}
